<?php
namespace app\admin\model;

use think\Model;
use think\Request;

class Feedbacktag extends Model
{

    public static  function getlist(Request $request)
    {
        $genData = $request->get();
        $genData = getOutpageData($genData);
        $model = new self();

        if (isset($genData['searchval'])){
            $model = $model->where('nickName','like',"%{$genData['searchval']}%")
                ->whereOr('content','like',"%{$genData['searchval']}%");
        }

        $res = $model->with('user')->order('id','desc')->paginate(10, false,[  'var_page' => 'page']);
        return $res;
    }

    public function user()
    {
        return $this->belongsTo(User::class,'user_id','id');
    }


}
